import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'
export const Layout = () => import("@/layout/index.vue");

const router = createRouter({
  history: createWebHashHistory(),
  routes: [
    {
      path: '/',
      name: 'home',
      component: Layout,
      redirect: "/home",
      children: [
        {
          path: '/home',
          component: () => import(/* webpackChunkName: "home" */ '../views/HomeView.vue')
        }
      ]
    },
    {
      path: '/about',
      name: 'about',
      redirect: "/about/index",
      component: Layout,
      children: [
        {
          path: '/about/index',
          component: () => import(/* webpackChunkName: "about" */ '../views/AboutView.vue')
        }
      ]
    }
  ]
})

export default router
